package com.project.bean;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 用户表实体类
 */
public class UserBean {
    /**用户id*/
    private int id;
    /**用户名*/
    private String name;
    /**用户密码*/
    private String pwd;
    /**用户邮箱*/
    private String email;
    /**用户图像*/
    private String imgPath;
    /**时间*/
    private LocalDateTime time=LocalDateTime.now();

    private ChannelBean channel;

    public UserBean() {
    }

    public UserBean(String name, String pwd, String email, String imgPath, int channelId) {
        this.name = name;
        this.pwd = pwd;
        this.email = email;
        this.imgPath = imgPath;
        this.channel=new ChannelBean();
        this.channel.setId(channelId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public LocalDateTime getTime() {
        return time;
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }

    public ChannelBean getChannel() {
        return channel;
    }

    public void setChannel(ChannelBean channel) {
        this.channel = channel;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", email='" + email + '\'' +
                ", imgPath='" + imgPath + '\'' +
                ", time=" + time +
                "}\n";
    }
}
